package net.net23.sysdent.client.ui.widgets.search;

import net.net23.sysdent.client.ui.widgets.model.SearcherWidget;

import com.google.gwt.resources.client.ImageResource;
import com.google.gwt.user.client.ui.DecoratorPanel;
import com.google.gwt.user.client.ui.FlexTable;
import com.google.gwt.user.client.ui.FlexTable.FlexCellFormatter;
import com.google.gwt.user.client.ui.HasHorizontalAlignment;
import com.google.gwt.user.client.ui.TextBox;
import com.google.gwt.user.client.ui.Widget;

public class TagsSearcher extends SearcherWidget {

	public TagsSearcher(String key, ImageResource icon) {
		super(key, icon);
	}

	@Override
	public Widget getCriteriaWidget() {
		// Create a table to layout the form options
		FlexTable layout = new FlexTable();
		layout.setCellSpacing(6);
		layout.setWidth("100%");
		FlexCellFormatter cellFormatter = layout.getFlexCellFormatter();

		// Add a title to the form
		layout.setHTML(0, 0, "Criterios de busqueda");
		cellFormatter.setColSpan(0, 0, 2);
		cellFormatter.setHorizontalAlignment(0, 0,
				HasHorizontalAlignment.ALIGN_CENTER);

		// Add some standard form options
		layout.setHTML(1, 0, "Nombre");
		layout.setWidget(1, 1, new TextBox());

		// Create some advanced options

		// Wrap the contents in a DecoratorPanel
		DecoratorPanel decPanel = new DecoratorPanel();
		decPanel.setWidget(layout);
		return decPanel;

	}

	@Override
	public ResultTable getResultWidget() {
		return null;
	}

	@Override
	public void performSearch() {
		// TODO Auto-generated method stub
		
	}
}
